import { modelAdd, modelRemove } from './modelOpera.js';

let allObject = [];

class DCJKGFrameAdd {
  constructor(scene) {
    const modelData = [
      { url: './model/计轴机柜柜体.fbx', num: 1, x: 0, y: 0, z: 0 },
      { url: './model/调车监控内部.fbx', num: 1, x: -3.5, y: 43.5, z: 2 },
      { url: './model/调车监控柜标签.fbx', num: 1, x: 8.2, y: 87.5, z: 2.5 },

      { url: './model/调车监控柜门.fbx', num: 1, x: 6.2, y: 12.5, z: 14.9 },
      { url: './model/调车监控玻璃门.fbx', num: 1, x: 6, y: -7.5, z: 1.6 },
      { url: './model/调车监控AB机灯.fbx', num: 1, x: 1, y: 63.5, z: 1.9 },
      { url: './model/切换开关旋钮.fbx', num: 1, x: 3, y: 60.5, z: 1.6 },
      { url: './model/键盘鼠标地面主A.fbx', num: 1, x: 2, y: -1.5, z: 1.6 },
      {
        url: './model/调车监控地面主机AB.fbx', children: [
          { num: 2, x: -2, y: -17.5, z: 3.3, offsetY: -21.5, },
        ]
      },
      { url: './model/地面主机AB.fbx', num: 1, x: 0.4, y: -34.5, z: -11.4 },
      { url: './model/地面主机BUPSAB.fbx', num: 1, x: 2, y: -45.5, z: 1.6 },
      { url: './model/华为服务器.fbx', num: 1, x: 1, y: -57.5, z: 0.6 },
      { url: './model/华为logo.fbx', num: 1, x: 4.6, y: -56, z: 16.6 },
      { url: './model/调车监控UPSB.fbx', num: 1, x: -3, y: -70.3, z: -5.6 },
      { url: './model/调车监控总电源.fbx', num: 1, x: 0.4, y: -83.5, z: 4.1 },
    ];
    new modelAdd(modelData, (group) => {
      group.position.set(-276.5, -26, -196);
      scene.add(group);
      allObject = group;
    });
  }
}
class DCJKGFrameRemove {
  constructor(scene) {
    new modelRemove(scene, allObject);
  }
}
export { DCJKGFrameAdd, DCJKGFrameRemove };